<?php
/**
 * 标签
 * author:www.tong-kuai.com
 */
namespace Api\Controller;

use Think\Controller;

class TagController extends Controller
{

    protected $tag_model;

    function __construct()
    {
        parent::__construct();
        $this->tag_model = D("Portal/Tag");
    }

    /**
     * 获取所有标签
     */
    public function getTags()
    {
        $tags1 = $this->tag_model->where(array("status" => "1", "taxonomy" => "1"))->order(array("listorder" => "asc"))->select();
        $tags0 = $this->tag_model->where(array("status" => "1", "taxonomy" => "0"))->order(array("listorder" => "asc"))->select();
        exit(json_encode(array('tags1' => $tags1, 'tags0' => $tags0)));
    }
}

